/**  
* @Title: MtonsVoiceVO.java
* @Package cn.net.mtons.weixin.reply.vo
* @Description: TODO
* @author ma jinjian  
* @date 2016年2月7日 下午3:21:58
* @version V1.0  
*/ 
package cn.net.mtons.weixin.rpl.vo;

import cn.net.mtons.weixin.MtonsBasicVO;
import cn.net.mtons.weixin.utils.MtonsMessageUtil;

/**
 * @ClassName: MtonsVoiceVO
 * @Description: TODO
 * @author ma jinjian
 * @date 2016年2月7日 下午3:21:58
 *
 */
public class MtonsVoiceVO extends MtonsBasicVO {

	private String msgType;
	
	private String mediaId;

	public String getMsgType() {
		return msgType;
	}

	public void setMsgType(String msgType) {
		this.msgType = msgType;
	}

	public String getMediaId() {
		return mediaId;
	}

	public void setMediaId(String mediaId) {
		this.mediaId = mediaId;
	}

	@Override
	public String toString() {
		return "MtonsVoiceVO [msgType=" + msgType + ", mediaId=" + mediaId
				+ "]";
	}

	@Override
	public String toXml() {
		MtonsMessageUtil util = new MtonsMessageUtil(super.toXml());
		util.addData("Voice", "MediaId", this.getMediaId());
		util.addData("MsgType", "image");
		util.surroundWith("xml");
		return util.toString();
	}
	
	public static void main(String[] args) {
		MtonsVoiceVO vo = new MtonsVoiceVO();
		vo.setToUserName("liujiao");
		vo.setFromUserName("majinjian");
		vo.setMediaId("54148484848");
		System.out.println(vo.toXml());
	}
}
